package com.zackeus.sipservice.constant;

import androidx.annotation.IntDef;

import org.pjsip.pjsua2.pjsip_status_code;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * SIP 状态码
 * @name: SipStatusCode
 * @author: zz
 * @date: 2022/9/22
 */
public final class SipStatusCode {

    public final static int SIP_NULL = pjsip_status_code.PJSIP_SC_NULL;
    public static final int SIP_TRYING = pjsip_status_code.PJSIP_SC_TRYING;
    public static final int SIP_RINGING = pjsip_status_code.PJSIP_SC_RINGING;
    public static final int SIP_CALL_BEING_FORWARDED = pjsip_status_code.PJSIP_SC_CALL_BEING_FORWARDED;
    public static final int SIP_CALL_QUEUED = pjsip_status_code.PJSIP_SC_QUEUED;
    public static final int SIP_SESSION_PROGRESS = pjsip_status_code.PJSIP_SC_PROGRESS;
    public static final int SIP_EARLY_DIALOG_TERMINATED = pjsip_status_code.PJSIP_SC_EARLY_DIALOG_TERMINATED;
    public static final int SIP_OK = pjsip_status_code.PJSIP_SC_OK;
    public static final int SIP_ACCEPTED = pjsip_status_code.PJSIP_SC_ACCEPTED;
    public static final int SIP_NO_NOTIFICATION = pjsip_status_code.PJSIP_SC_NO_NOTIFICATION;
    public static final int SIP_MULTIPLE_CHOICES = pjsip_status_code.PJSIP_SC_MULTIPLE_CHOICES;
    public static final int SIP_MOVED_PERMANENTLY = pjsip_status_code.PJSIP_SC_MOVED_PERMANENTLY;
    public static final int SIP_MOVED_TEMPORARILY = pjsip_status_code.PJSIP_SC_MOVED_TEMPORARILY;
    public static final int SIP_USE_PROXY = pjsip_status_code.PJSIP_SC_USE_PROXY;
    public static final int SIP_ALTERNATIVE_SERVICE = pjsip_status_code.PJSIP_SC_ALTERNATIVE_SERVICE;
    public static final int SIP_BAD_REQUEST = pjsip_status_code.PJSIP_SC_BAD_REQUEST;
    public static final int SIP_UNAUTHORIZED = pjsip_status_code.PJSIP_SC_UNAUTHORIZED;
    public static final int SIP_PAYMENT_REQUIRED = pjsip_status_code.PJSIP_SC_PAYMENT_REQUIRED;
    public static final int SIP_FORBIDDEN = pjsip_status_code.PJSIP_SC_FORBIDDEN;
    public static final int SIP_NOT_FOUND = pjsip_status_code.PJSIP_SC_NOT_FOUND;
    public static final int SIP_METHOD_NOT_ALLOWED = pjsip_status_code.PJSIP_SC_METHOD_NOT_ALLOWED;
    public static final int SIP_NOT_ACCEPTABLE = pjsip_status_code.PJSIP_SC_NOT_ACCEPTABLE;
    public static final int SIP_PROXY_AUTHENTICATION_REQUIRED = pjsip_status_code.PJSIP_SC_PROXY_AUTHENTICATION_REQUIRED;
    public static final int SIP_REQUEST_TIMEOUT = pjsip_status_code.PJSIP_SC_REQUEST_TIMEOUT;
    public static final int SIP_CONFLICT = pjsip_status_code.PJSIP_SC_CONFLICT;
    public static final int SIP_GONE = pjsip_status_code.PJSIP_SC_GONE;
    public static final int SIP_LENGTH_REQUIRED = pjsip_status_code.PJSIP_SC_LENGTH_REQUIRED;
    public static final int SIP_CONDITIONAL_REQUEST_FAILED = pjsip_status_code.PJSIP_SC_CONDITIONAL_REQUEST_FAILED;
    public static final int SIP_REQUEST_ENTITY_TOO_LARGE = pjsip_status_code.PJSIP_SC_REQUEST_ENTITY_TOO_LARGE;
    public static final int SIP_REQUEST_URL_TOO_LONG = pjsip_status_code.PJSIP_SC_REQUEST_URI_TOO_LONG;
    public static final int SIP_UNSUPPORTED_MEDIA_TYPE = pjsip_status_code.PJSIP_SC_UNSUPPORTED_MEDIA_TYPE;
    public static final int SIP_UNSUPPORTED_URL_SCHEME = pjsip_status_code.PJSIP_SC_UNSUPPORTED_URI_SCHEME;
    public static final int SIP_UNKNOWN_RESOURCE_PRIORITY = pjsip_status_code.PJSIP_SC_UNKNOWN_RESOURCE_PRIORITY;
    public static final int SIP_BAD_EXTENSION = pjsip_status_code.PJSIP_SC_BAD_EXTENSION;
    public static final int SIP_EXTENSION_REQUIRED = pjsip_status_code.PJSIP_SC_EXTENSION_REQUIRED;
    public static final int SIP_SESSION_TIMER_TOO_SMALL = pjsip_status_code.PJSIP_SC_SESSION_TIMER_TOO_SMALL;
    public static final int SIP_INTERVAL_TOO_BRIEF = pjsip_status_code.PJSIP_SC_INTERVAL_TOO_BRIEF;
    public static final int SIP_BAD_LOCATION_INFORMATION = pjsip_status_code.PJSIP_SC_BAD_LOCATION_INFORMATION;
    public static final int SIP_USE_IDENTITY_HEADER = pjsip_status_code.PJSIP_SC_USE_IDENTITY_HEADER;
    public static final int SIP_PROVIDE_REFERRER_HEADER = pjsip_status_code.PJSIP_SC_PROVIDE_REFERRER_HEADER;
    public static final int SIP_FLOW_FAILED = pjsip_status_code.PJSIP_SC_FLOW_FAILED;
    public static final int SIP_ANONIMITY_DISALLOWED = pjsip_status_code.PJSIP_SC_ANONIMITY_DISALLOWED;
    public static final int SIP_BAD_IDENTITY_INFO = pjsip_status_code.PJSIP_SC_BAD_IDENTITY_INFO;
    public static final int SIP_UNSUPPORTED_CERTIFICATE = pjsip_status_code.PJSIP_SC_UNSUPPORTED_CERTIFICATE;
    public static final int SIP_INVALID_IDENTITY_HEADER = pjsip_status_code.PJSIP_SC_INVALID_IDENTITY_HEADER;
    public static final int SIP_FIRST_HOP_LACKS_OUTBOUND_SUPPORT = pjsip_status_code.PJSIP_SC_FIRST_HOP_LACKS_OUTBOUND_SUPPORT;
    public static final int SIP_MAX_BREADTH_EXCEEDED = pjsip_status_code.PJSIP_SC_MAX_BREADTH_EXCEEDED;
    public static final int SIP_BAD_INFO_PACKAGE = pjsip_status_code.PJSIP_SC_BAD_INFO_PACKAGE;
    public static final int SIP_CONSENT_NEEDED = pjsip_status_code.PJSIP_SC_CONSENT_NEEDED;
    public static final int SIP_TEMPORARILY_UNAVAILABLE = pjsip_status_code.PJSIP_SC_TEMPORARILY_UNAVAILABLE;
    public static final int SIP_TRANSACTION_DOES_NOT_EXIST = pjsip_status_code.PJSIP_SC_CALL_TSX_DOES_NOT_EXIST;
    public static final int SIP_LOOP_DETECTED = pjsip_status_code.PJSIP_SC_LOOP_DETECTED;
    public static final int SIP_TOO_MANY_HOPS = pjsip_status_code.PJSIP_SC_TOO_MANY_HOPS;
    public static final int SIP_ADDRESS_INCOMPLETE = pjsip_status_code.PJSIP_SC_ADDRESS_INCOMPLETE;
    public static final int SIP_AMBIGUOUS = pjsip_status_code.PJSIP_AC_AMBIGUOUS;
    public static final int SIP_BUSY_HERE = pjsip_status_code.PJSIP_SC_BUSY_HERE;
    public static final int SIP_REQUEST_TERMINATED = pjsip_status_code.PJSIP_SC_REQUEST_TERMINATED;
    public static final int SIP_NOT_ACCEPTABLE_HERE = pjsip_status_code.PJSIP_SC_NOT_ACCEPTABLE_HERE;
    public static final int SIP_BAD_EVENT = pjsip_status_code.PJSIP_SC_BAD_EVENT;
    public static final int SIP_REQUEST_UPDATED = pjsip_status_code.PJSIP_SC_REQUEST_UPDATED;
    public static final int SIP_REQUEST_PENDING = pjsip_status_code.PJSIP_SC_REQUEST_PENDING;
    public static final int SIP_UNDECIPHERABLE = pjsip_status_code.PJSIP_SC_UNDECIPHERABLE;
    public static final int SIP_SECURITY_AGREEMENT_NEEDED = pjsip_status_code.PJSIP_SC_SECURITY_AGREEMENT_NEEDED;
    public static final int SIP_SERVER_INTERNAL_ERROR = pjsip_status_code.PJSIP_SC_INTERNAL_SERVER_ERROR;
    public static final int SIP_NOT_IMPLEMENTED = pjsip_status_code.PJSIP_SC_NOT_IMPLEMENTED;
    public static final int SIP_BAD_GATEWAY = pjsip_status_code.PJSIP_SC_BAD_GATEWAY;
    public static final int SIP_SERVICE_UNAVAILABLE = pjsip_status_code.PJSIP_SC_SERVICE_UNAVAILABLE;
    public static final int SIP_SERVER_TIME_OUT = pjsip_status_code.PJSIP_SC_SERVER_TIMEOUT;
    public static final int SIP_VERSION_NOT_SUPPORTED = pjsip_status_code.PJSIP_SC_VERSION_NOT_SUPPORTED;
    public static final int SIP_MESSAGE_TOO_LARGE = pjsip_status_code.PJSIP_SC_MESSAGE_TOO_LARGE;
    public static final int SIP_PUSH_NOTIFICATION_SERVICE_NOT_SUPPORTED = pjsip_status_code.PJSIP_SC_PUSH_NOTIFICATION_SERVICE_NOT_SUPPORTED;
    public static final int SIP_PRECONDITION_FAILURE = pjsip_status_code.PJSIP_SC_PRECONDITION_FAILURE;
    public static final int SIP_BUSY_EVERYWHERE = pjsip_status_code.PJSIP_SC_BUSY_EVERYWHERE;
    public static final int SIP_DECLINED = pjsip_status_code.PJSIP_SC_DECLINE;
    public static final int SIP_DOES_NOT_EXIST_ANYWHERE = pjsip_status_code.PJSIP_SC_DOES_NOT_EXIST_ANYWHERE;
    public static final int SIP_NOT_ACCEPTABLE_ANYWHERE = pjsip_status_code.PJSIP_SC_NOT_ACCEPTABLE_ANYWHERE;
    public static final int SIP_UNWANTED = pjsip_status_code.PJSIP_SC_UNWANTED;
    public static final int SIP_REJECTED = pjsip_status_code.PJSIP_SC_REJECTED;

    @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
    @Retention(RetentionPolicy.SOURCE)
    @IntDef({SIP_NULL, SIP_TRYING, SIP_RINGING, SIP_CALL_BEING_FORWARDED,
            SIP_CALL_QUEUED, SIP_SESSION_PROGRESS,
            SIP_EARLY_DIALOG_TERMINATED, SIP_OK, SIP_ACCEPTED, SIP_NO_NOTIFICATION,
            SIP_MULTIPLE_CHOICES, SIP_MOVED_PERMANENTLY, SIP_MOVED_TEMPORARILY,
            SIP_USE_PROXY, SIP_ALTERNATIVE_SERVICE, SIP_BAD_REQUEST, SIP_UNAUTHORIZED,
            SIP_PAYMENT_REQUIRED, SIP_FORBIDDEN, SIP_NOT_FOUND, SIP_METHOD_NOT_ALLOWED,
            SIP_NOT_ACCEPTABLE, SIP_PROXY_AUTHENTICATION_REQUIRED, SIP_REQUEST_TIMEOUT,
            SIP_CONFLICT, SIP_GONE, SIP_LENGTH_REQUIRED, SIP_CONDITIONAL_REQUEST_FAILED,
            SIP_REQUEST_ENTITY_TOO_LARGE, SIP_REQUEST_URL_TOO_LONG, SIP_UNSUPPORTED_MEDIA_TYPE,
            SIP_UNSUPPORTED_URL_SCHEME, SIP_UNKNOWN_RESOURCE_PRIORITY,
            SIP_BAD_EXTENSION, SIP_EXTENSION_REQUIRED, SIP_SESSION_TIMER_TOO_SMALL,
            SIP_INTERVAL_TOO_BRIEF, SIP_BAD_LOCATION_INFORMATION, SIP_USE_IDENTITY_HEADER,
            SIP_PROVIDE_REFERRER_HEADER, SIP_FLOW_FAILED, SIP_ANONIMITY_DISALLOWED,
            SIP_BAD_IDENTITY_INFO, SIP_UNSUPPORTED_CERTIFICATE, SIP_INVALID_IDENTITY_HEADER,
            SIP_FIRST_HOP_LACKS_OUTBOUND_SUPPORT, SIP_MAX_BREADTH_EXCEEDED,
            SIP_BAD_INFO_PACKAGE, SIP_CONSENT_NEEDED,
            SIP_TEMPORARILY_UNAVAILABLE, SIP_TRANSACTION_DOES_NOT_EXIST, SIP_LOOP_DETECTED,
            SIP_TOO_MANY_HOPS, SIP_ADDRESS_INCOMPLETE, SIP_AMBIGUOUS, SIP_BUSY_HERE,
            SIP_REQUEST_TERMINATED, SIP_NOT_ACCEPTABLE_HERE, SIP_BAD_EVENT,
            SIP_REQUEST_UPDATED, SIP_REQUEST_PENDING,
            SIP_UNDECIPHERABLE, SIP_SECURITY_AGREEMENT_NEEDED, SIP_SERVER_INTERNAL_ERROR,
            SIP_NOT_IMPLEMENTED, SIP_BAD_GATEWAY, SIP_SERVICE_UNAVAILABLE, SIP_SERVER_TIME_OUT,
            SIP_VERSION_NOT_SUPPORTED, SIP_MESSAGE_TOO_LARGE,
            SIP_PUSH_NOTIFICATION_SERVICE_NOT_SUPPORTED, SIP_PRECONDITION_FAILURE,
            SIP_BUSY_EVERYWHERE, SIP_DECLINED, SIP_DOES_NOT_EXIST_ANYWHERE,
            SIP_NOT_ACCEPTABLE_ANYWHERE, SIP_UNWANTED, SIP_REJECTED })
    public @interface Unit {}
}
